package cn.chinaflame.pagodas.req;

import cn.chinaflame.pagodas.constant.Sysconst;
import cn.chinaflame.pagodas.enums.CodeEnum;
import cn.chinaflame.pagodas.utils.ParamPreconditions;

/**
 * @author created by lbq
 * @date 2018年1月5日 上午10:28:56
 **/
public class PaAgentReq extends BaseReq {
    private String id;
    private String loginId;
    private String loginPwd;//初始密码为默认密码 平台给一个默认密码为123456
    private String name;//代理人姓名
    private String mobile;//手机号
    private String email;//代理人邮箱
    private String idType;
    private String idNo;
    private String idSpeType;
    private String idSpeNo;
    private String provinceCode;//必传 省编码
    private String provinceName;//
    private String cityCode;//市编码
    private String cityName;
    private String areaCode;//区域编码
    private String areaName;
    private String agentLevel;//代理等级
    private String parentId;//当前代理id  （上级字段）
    private String contractStartTime;//合约开始时间
    private String contractEndTime;//合约结束时间
    private String comment;//备注
    private String bankCode;//开户行代码
    private String bankName;
    private String cardNumber;//银行卡卡号
    private String projectId;//所属大类

    public PaAgentReq() {
        super();
    }

    @Override
    public void check() {
        ParamPreconditions.checkNotEmpty(name, CodeEnum.FAIL.getCode(), "代理人姓名不能为空");
        ParamPreconditions.checkNotEmpty(mobile, CodeEnum.FAIL.getCode(), "代理人手机号不能为空");
        ParamPreconditions.checkNotEmpty(email, CodeEnum.FAIL.getCode(), "代理人邮箱不能为空");
        ParamPreconditions.checkArgument(Sysconst.CountyList.containsKey(areaCode), CodeEnum.FAIL.getCode(), "区代码有误");
        ParamPreconditions.checkArgument(Sysconst.CityList.containsKey(cityCode), CodeEnum.FAIL.getCode(), "市代码有误");
        ParamPreconditions.checkArgument(Sysconst.ProvinceList.containsKey(provinceCode), CodeEnum.FAIL.getCode(), "省份代码有误");
        ParamPreconditions.checkNotNull(contractStartTime, CodeEnum.FAIL.getCode(), "合约开始时间不能为空");
        ParamPreconditions.checkNotNull(contractEndTime, CodeEnum.FAIL.getCode(), "合约结束时间不能为空");
        ParamPreconditions.checkNotEmpty(comment, CodeEnum.FAIL.getCode(), "备注不能为空");
        ParamPreconditions.checkNotEmpty(bankCode, CodeEnum.FAIL.getCode(), "开户行代码不能为空");
        ParamPreconditions.checkNotEmpty(cardNumber, CodeEnum.FAIL.getCode(), "银行卡卡号");
        ParamPreconditions.checkNotEmpty(projectId, CodeEnum.FAIL.getCode(), "项目编号不能为空");
        //super.check();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProjectId() {
        return projectId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getLoginId() {
        return loginId;
    }

    public void setLoginId(String loginId) {
        this.loginId = loginId;
    }

    public String getLoginPwd() {
        return loginPwd;
    }

    public void setLoginPwd(String loginPwd) {
        this.loginPwd = loginPwd;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getIdType() {
        return idType;
    }

    public void setIdType(String idType) {
        this.idType = idType;
    }

    public String getIdNo() {
        return idNo;
    }

    public void setIdNo(String idNo) {
        this.idNo = idNo;
    }

    public String getIdSpeType() {
        return idSpeType;
    }

    public void setIdSpeType(String idSpeType) {
        this.idSpeType = idSpeType;
    }

    public String getIdSpeNo() {
        return idSpeNo;
    }

    public void setIdSpeNo(String idSpeNo) {
        this.idSpeNo = idSpeNo;
    }

    public String getProvinceCode() {
        return provinceCode;
    }

    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getAgentLevel() {
        return agentLevel;
    }

    public void setAgentLevel(String agentLevel) {
        this.agentLevel = agentLevel;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getContractStartTime() {
        return contractStartTime;
    }

    public void setContractStartTime(String contractStartTime) {
        this.contractStartTime = contractStartTime;
    }

    public String getContractEndTime() {
        return contractEndTime;
    }

    public void setContractEndTime(String contractEndTime) {
        this.contractEndTime = contractEndTime;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getBankCode() {
        return bankCode;
    }

    public void setBankCode(String bankCode) {
        this.bankCode = bankCode;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(String cardNumber) {
        this.cardNumber = cardNumber;
    }

}
